package com.ajavaer.framework.config;

import com.ajavaer.framework.cache.type.CacheEngine;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.DependsOn;

/**
 * 腾讯云通信
 */
@DependsOn({"CacheConfig"})
@ConfigurationProperties(prefix = "ajavaer.im.tencent")
public class TencentImConfig {
    private CacheEngine cacheEngine = CacheEngine.redis;
    private Long appid;
    /**
     * 管理员账号
     */
    private String admin;
    private String privateKey;
    private String publicKey;
    private String userSigCacheKey = "IM:TENCENT:SIG_CACHE_KEY";
    /**
     * 帐号生成的签名有效期，参见 <a href='https://cloud.tencent.com/document/product/269/32688'>UserSig 后台 API</a>
     */
    private Integer userSigExpire = 24 * 3600 * 180;

    public String getAdmin() {
        return admin;
    }

    public void setAdmin(String admin) {
        this.admin = admin;
    }

    public CacheEngine getCacheEngine() {
        return cacheEngine;
    }

    public Long getAppid() {
        return appid;
    }

    public void setAppid(Long appid) {
        this.appid = appid;
    }

    public void setCacheEngine(CacheEngine cacheEngine) {
        this.cacheEngine = cacheEngine;
    }

    public String getPrivateKey() {
        return privateKey;
    }

    public void setPrivateKey(String privateKey) {
        this.privateKey = privateKey;
    }

    public String getPublicKey() {
        return publicKey;
    }

    public void setPublicKey(String publicKey) {
        this.publicKey = publicKey;
    }

    public Integer getUserSigExpire() {
        return userSigExpire;
    }

    public void setUserSigExpire(Integer userSigExpire) {
        this.userSigExpire = userSigExpire;
    }

    public String getUserSigCacheKey() {
        return userSigCacheKey;
    }

    public void setUserSigCacheKey(String userSigCacheKey) {
        this.userSigCacheKey = userSigCacheKey;
    }
}
